const Mock = require("mockjs");
const data = Mock.mock({
  "items|15": [
    {
      cl_id: "@increment",
      cl_name: "@ctitle",
      cl_salePrice: "@integer(30, 100)",
      cl_size: "@integer(1, 9)",
      cl_category_id: '@character("upper")' + "@integer(1, 999)",
      cl_brand_id: '@character("upper")' + "@integer(1, 999)",
      cl_category: {
        cl_category_name: "@ctitle",
        },
      cl_brand: {
        cl_brand_name: "@ctitle",
        },
    },
  ],
});
module.exports = [
  {
    url: "/clothes/page",
    type: "get",
    response: (req, res) => {
      const items = data.items;
      return {
        code: 200,
        data: {
          total: items.length,
          pagetNum: 1,
          pageSize: 10,
          items: items,
        },
      };
    },
  },
];
